<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ taglib prefix="spring" uri = "http://www.springframework.org/tags" %>
    <%@ taglib prefix="springForm" uri="http://www.springframework.org/tags/form" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
	<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
    
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Employees</title>
</head>
<body>
	<c:out value="${employeesView.title}"/>
	<table border="1">
		<thead>
			<tr>
				<th>Emp ID</th>
				<th>Emp Name</th>
				<th>Emp Addr</th>
				<th>Edit </th>
				<th>Delete</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${employeesView.employees}" var="employee">
				<tr>
					<td><c:out value="${employee.empId}"/></td>
					<td><c:out value="${employee.empName}"/></td>
					<td><c:out value="${employee.empAddress}"/></td>
					<td><a href="newemp.jas?id=<c:out value='${employee.empId}'/>">Edit</a></td>
					<td><a href="index.jas?action=deleteEmployee&id=<c:out value='${employee.empId }'/>">Delete</a></td>
				</tr>
			</c:forEach>			
		</tbody>
	</table>
</body>
</html>